package demo.jdk.features.jdk6;

import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;

/**
 * @author Ranchoz  2018/9/9 11:47
 **/
public class JsScriptRunner {

	public ScriptEngine getJavaScriptEngine() {
		ScriptEngineManager manager = new ScriptEngineManager();
		//支持通过名称、文件扩展名、MIMEtype查找
		ScriptEngine engine = manager.getEngineByName("JavaScript");
		return engine;
	}
}
